<?php $this->load->view('common/head');?>

<?php $this->load->view('common/header');?>
<div class="main-container" id="main-container">
    <script type="text/javascript">
        try {
            ace.settings.check('main-container', 'fixed')
        } catch (e) {
        }
    </script>

    <?php $this->load->view('common/sidebar');?>
    <div class="main-content">
        <div class="main-content-inner">
            <!-- #section:basics/content.breadcrumbs -->
            <?php $this->load->view('common/breadcrumbs');?>

            <!-- /section:basics/content.breadcrumbs -->
            <div class="page-content">

                <?php $this->load->view('common/set');?>

                <!-- /section:settings.box -->
                <div class="row">
                    

                    <div class="col-xs-12">

                        </div>
                        <table class="table table-striped table-bordered">
                            <thead>
                            <tr>
                                <th class="center"><input class="check-all" type="checkbox" value=""></th>
                                <th>店铺名称</th>
                                <th>商品名称</th>
                                <th>用户名</th>
                                <th>免单价值</th>
                                <th class="center">生成时间</th>
                                <th class="center">失效时间</th>
                                <th>是否使用</th>
                                <th class="center">操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php if($vouchers){
                                foreach ($vouchers as $key => $v) {?>
                                    <tr>
                                        <td><?php echo $v['shop_title'] ?></td>
                                        <td><?php echo $v['good_title'] ?></td>
                                        <td><?php echo $v['user_name'] ?></td>
                                        <td><?php echo $v['voucher_price'] ?></td>
                                        <td><?php echo date("Y-m-d H:i:s",$v['voucher_time']) ?></td>
                                        <td><?php echo date("Y-m-d H:i:s",$v['voucher_end_time']) ?></td>
                                        <td><?php echo $v['voucher_lock'] ?></td>
                                    </tr>
                               <?php }?>
                            <?php }else{?>
                                暂无免单券
                            <?php }?>                            
                            </tbody>
                        </table>
<!--                        {$page}-->
                        <!-- PAGE CONTENT ENDS -->
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.page-content -->
    </div><!-- /.main-content -->

<?php $this->load->view('common/footer');?>
</div><!-- /.main-container -->

<?php $this->load->view('common/footerjs');?>
<!-- inline scripts related to this page -->
<script type="text/javascript">

    $(function () {
        $("#officialnews ul").html('<div class="ace-icon fa fa-spinner fa-spin orange"></div>');
    })
    $("#addshop").click(function () {
        window.location.href="add";
    });

</script>
</body>
</html>
